package com.ineatconseil.yougo.exceptions;

import com.sun.jersey.api.client.ClientResponse;
import com.sun.jersey.api.client.ClientResponse.Status;

/**
 * Exception to managed errors on the REST process.
 * 
 */
public class RestServiceException extends Exception {

	/**
	 * Generated serial id.
	 */
	private static final long serialVersionUID = -2725788066273548196L;

	/**
	 * The request status.
	 */
	private ClientResponse.Status status;

	public RestServiceException() {
		super();
	}

	public RestServiceException(String message, Throwable cause) {
		super(message, cause);
	}

	public RestServiceException(String message) {
		super(message);
	}

	public RestServiceException(Throwable cause) {
		super(cause);
	}

	public ClientResponse.Status getStatus() {
		return status;
	}

	public void setStatus(ClientResponse.Status status) {
		this.status = status;
	}

	/**
	 * @param status
	 */
	public RestServiceException(Status status) {
		super();
		this.status = status;
	}

}
